import requestFile from '@/utils/request-file'

// 上传图片
export const uploadImage = data => {
    return requestFile({
        method: 'POST',
        url: '/admin/uploadImage',
        data
    })
}

export const uploadVideo = (data, onUploadProgress) => {
    return requestFile({
        method: 'POST',
        url: '/upload',
        data,
        onUploadProgress
    })
}

export const progress = () => {
    return requestFile({
        method: 'GET',
        url: '/getProgress',
    })
}
